package com.edu.demo.tool;

/**
 * @author XYH
 * date 2024-03-08
 */
public class MyTool {
    public static boolean isValidEmail(String email) {
        String EMAIL_PATTERN = "^[\\w-_.+]*[\\w-_.]+@(\\w+\\.)+\\w+\\w$";
        return email.matches(EMAIL_PATTERN);
    }

    public static boolean isPassWord(String passWord) {
        String pattern = "(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9]).*";
        return passWord.matches(pattern);
    }
}
